export const useOrderNo = (): string => {
  const currentDate = new Date()
  const year = currentDate.getFullYear().toString()
  const month = (currentDate.getMonth() + 1).toString().padStart(2, '0')
  const day = currentDate.getDate().toString().padStart(2, '0')
  const hours = currentDate.getHours().toString().padStart(2, '0')
  const minutes = currentDate.getMinutes().toString().padStart(2, '0')
  const seconds = currentDate.getSeconds().toString().padStart(2, '0')
  const timestamp = Math.floor(Date.now() / 1000)
    .toString()
    .padStart(10, '0')
  const random = Math.floor(Math.random() * 1000000)
    .toString()
    .padStart(6, '0')
  return year + month + day + hours + minutes + seconds + 'T' + timestamp + 'R' + random
}
